/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * halamanutamaManager.java
 *
 * Created on 07 Nov 11, 20:59:44
 */
package rentalmobil.gui;

import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import rentalmobil.Help.FormBantuanKaryawan;

/**
 *
 * @author User
 */
public class halamanutamaManager extends javax.swing.JFrame {

    /** Creates new form halamanutamaManager */
    public halamanutamaManager() {
        super("Menu Utama Manager");
        initComponents();
        setLocationRelativeTo(null);

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jDesktopPane1 = new javax.swing.JDesktopPane();
        jMenuBar1 = new javax.swing.JMenuBar();
        mnuFile = new javax.swing.JMenu();
        jMenuItem2 = new javax.swing.JMenuItem();
        mnuTransaksi = new javax.swing.JMenu();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenuItem4 = new javax.swing.JMenuItem();
        mnuData = new javax.swing.JMenu();
        mnuItemDataSewa = new javax.swing.JMenuItem();
        mnuItemDataKembali = new javax.swing.JMenuItem();
        mnuItemLaporan = new javax.swing.JMenuItem();
        mnuBantuan = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jDesktopPane1.setBackground(new java.awt.Color(204, 255, 204));

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 629, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jDesktopPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 629, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 364, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jDesktopPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 364, Short.MAX_VALUE))
        );

        jMenuBar1.setBackground(new java.awt.Color(204, 255, 204));

        mnuFile.setBackground(new java.awt.Color(204, 255, 204));
        mnuFile.setText("File");

        jMenuItem2.setText("Logout");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        mnuFile.add(jMenuItem2);

        jMenuBar1.add(mnuFile);

        mnuTransaksi.setBackground(new java.awt.Color(204, 255, 204));
        mnuTransaksi.setText("Transaksi");

        jMenuItem3.setText("Update Mobil");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        mnuTransaksi.add(jMenuItem3);

        jMenuItem4.setText("Laporan Mobil");
        jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem4ActionPerformed(evt);
            }
        });
        mnuTransaksi.add(jMenuItem4);

        jMenuBar1.add(mnuTransaksi);

        mnuData.setBackground(new java.awt.Color(204, 255, 204));
        mnuData.setText("Data");

        mnuItemDataSewa.setText("Data Sewa");
        mnuItemDataSewa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuItemDataSewaActionPerformed(evt);
            }
        });
        mnuData.add(mnuItemDataSewa);

        mnuItemDataKembali.setText("Data Kembali");
        mnuItemDataKembali.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuItemDataKembaliActionPerformed(evt);
            }
        });
        mnuData.add(mnuItemDataKembali);

        mnuItemLaporan.setText("Data Laporan Mobil");
        mnuItemLaporan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuItemLaporanActionPerformed(evt);
            }
        });
        mnuData.add(mnuItemLaporan);

        jMenuBar1.add(mnuData);

        mnuBantuan.setBackground(new java.awt.Color(204, 255, 204));
        mnuBantuan.setText("Bantuan");

        jMenuItem1.setText("About");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        mnuBantuan.add(jMenuItem1);

        jMenuBar1.add(mnuBantuan);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void menuUpdateDataMobilActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuUpdateDataMobilActionPerformed
    }//GEN-LAST:event_menuUpdateDataMobilActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        if (JOptionPane.showConfirmDialog(this, "Apakah anda yakin untuk logout", "konfirmasi", JOptionPane.YES_NO_OPTION) == 0) {
            try {
                new formLogin().setVisible(true);
                this.dispose();
            } catch (Exception ex) {
                Logger.getLogger(halamanutamaManager.class.getName()).log(Level.SEVERE, null, ex);
            }

        }
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        try {
            new updateDataMobil(this, true).setVisible(true);
        } catch (SQLException ex) {
            Logger.getLogger(halamanutamaManager.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
        try {
            new FormLaporanDataMobil2(this, true).setVisible(true);
        } catch (SQLException ex) {
            Logger.getLogger(halamanutamaManager.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jMenuItem4ActionPerformed

    private void mnuItemDataSewaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuItemDataSewaActionPerformed
        dataSewa dSewa;
        try {
            dSewa = new dataSewa();
            jDesktopPane1.add(dSewa);
            dSewa.setVisible(true);
        } catch (SQLException ex) {
            Logger.getLogger(halamanutamaManager.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_mnuItemDataSewaActionPerformed

    private void mnuItemDataKembaliActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuItemDataKembaliActionPerformed
        kembaliMobil kM = null;
        try {
            kM = new kembaliMobil();
        } catch (SQLException ex) {
            Logger.getLogger(halamanutamaManager.class.getName()).log(Level.SEVERE, null, ex);
        }
        jDesktopPane1.add(kM);
        kM.setVisible(true);
    }//GEN-LAST:event_mnuItemDataKembaliActionPerformed

    private void mnuItemLaporanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuItemLaporanActionPerformed
        LapDataMobil lapD = null;
        try {
            lapD = new LapDataMobil();
        } catch (SQLException ex) {
            Logger.getLogger(halamanutamaManager.class.getName()).log(Level.SEVERE, null, ex);
        }
        jDesktopPane1.add(lapD);
        lapD.setVisible(true);
    }//GEN-LAST:event_mnuItemLaporanActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        FormBantuanKaryawan iBantuan = new FormBantuanKaryawan();
        jDesktopPane1.add(iBantuan);
        iBantuan.setVisible(true);
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new halamanutamaManager().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JDesktopPane jDesktopPane1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JMenu mnuBantuan;
    private javax.swing.JMenu mnuData;
    private javax.swing.JMenu mnuFile;
    private javax.swing.JMenuItem mnuItemDataKembali;
    private javax.swing.JMenuItem mnuItemDataSewa;
    private javax.swing.JMenuItem mnuItemLaporan;
    private javax.swing.JMenu mnuTransaksi;
    // End of variables declaration//GEN-END:variables
}
